home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Peter's Final Project / src / face.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-10  |  2.4 KB  |  75 lines  |  [TEXT/KAHL]

  1. /*
  2.  *  Peter's Final Project -- A texture mapping demonstration
  3.  *  © 1995, Peter Mattis
  4.  *
  5.  *  E-mail:
  6.  *  petm@soda.csua.berkeley.edu
  7.  *
  8.  *  Snail-mail:
  9.  *   Peter Mattis
  10.  *   557 Fort Laramie Dr.
  11.  *   Sunnyvale, CA 94087
  12.  *
  13.  *  Avaible from:
  14.  *  http://www.csua.berkeley.edu/~petm/final.html
  15.  *
  16.  *  This program is free software; you can redistribute it and/or modify
  17.  *  it under the terms of the GNU General Public License as published by
  18.  *  the Free Software Foundation; either version 2 of the License, or
  19.  *  (at your option) any later version.
  20.  *
  21.  *  This program is distributed in the hope that it will be useful,
  22.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  23.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  24.  *  GNU General Public License for more details.
  25.  *
  26.  *  You should have received a copy of the GNU General Public License
  27.  *  along with this program; if not, write to the Free Software
  28.  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  29.  */
  30.  
  31. #ifndef __FACE_H__
  32. #define __FACE_H__
  33.  
  34. #include "list.h"
  35. #include "point.h"
  36. #include "texture.h"
  37. #include "type.defs.h"
  38.  
  39. FACE make_face (void);
  40. void free_face (FACE);
  41.  
  42. FACES faces_append_face (FACES, FACE);
  43. FACES faces_prepend_face (FACES, FACE);
  44. void free_faces (FACES);
  45.  
  46. long face_mem_usage (void);
  47.  
  48. #define face_points(f)      ((f)->points)
  49. #define face_normal(f)      ((f)->normal)
  50. #define face_texture_o(f)   ((f)->texture_o)
  51. #define face_texture_u(f)   ((f)->texture_u)
  52. #define face_texture_v(f)   ((f)->texture_v)
  53. #define face_intensity(f)   ((f)->intensity)
  54. #define face_texture(f)     ((f)->texture)
  55. #define face_obstructs(f)   ((f)->obstructs)
  56.  
  57. #define set_face_points(f, k)     (face_points(f) = (k))
  58. #define set_face_normal(f, k)     (face_normal(f) = (k))
  59. #define set_face_texture_o(f, k)  (face_texture_o(f) = (k))
  60. #define set_face_texture_u(f, k)  (face_texture_u(f) = (k))
  61. #define set_face_texture_v(f, k)  (face_texture_v(f) = (k))
  62. #define set_face_intensity(f, k)  (face_intensity(f) = (k))
  63. #define set_face_texture(f, k)    (face_texture(f) = (k))
  64. #define set_face_obstructs(f, k)  (face_obstructs(f) = (k))
  65.  
  66. #define faces_first(f)      ((FACE) list_datum((LIST) f))
  67. #define faces_rest(f)       ((FACES) list_next((LIST) f))
  68.  
  69. #define set_faces_first(f, k)   (set_list_datum((LIST) f, k))
  70. #define set_faces_rest(f, k)    (set_list_next((LIST) f, k))
  71.  
  72. #define faces_add_face  faces_prepend_face
  73.  
  74. #endif /* __FACE_H__ */
  75.